<template>
	<!--正在热映-->
	<div class="ppp">
		<div class="diany" v-for='re in reying'>
			<div class="tu">
				<router-link :to="{name: 'detail', params: {'id': re.id}}">
					<img :src="re.cover.origin" />
				</router-link>
			</div>
			<div class="jiaqia">
				<div class="jaleft">
					<p v-text="re.name"></p>
					<span v-text='re.cinemaCount'></span>家电影院上映　<span v-text="re.watchCount"></span>人购票</div>
				<div class="jafen" v-text="re.grade">9.5</div>
			</div>
		</div>
		<!--更多热映-->
		<div class="gengduo">
			<a href="#">更多热映电影</a>
		</div>
	</div>

</template>

<script>
	import $ from 'jquery';

	export default {
		data: function() {
			return {
				reying: []
			}
		},
		mounted: function() {
			var url = 'http://localhost:3000/reying?time=' + new Date().getTime();
			var chat = this;
			$.get(url, function(res) {
				chat.reying = res.data.films
			})
		}
	}
</script>